feat(kms-connector): retrieve s3 url in extra_data#812
feat(kms-connector): retrieve s3 url in extra_data#812eudelins-zama wants to merge 5 commits intofeat/coprocessor_contexts_in_gatewayfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the KMS connector to retrieve S3 URLs from extra_data instead of querying the GatewayConfig contract. The main change involves replacing the coprocessor address-based S3 URL lookup with direct URL extraction from request metadata.
- Removes dependency on GatewayConfig contract for S3 URL retrieval
- Implements S3 URL matrix decoding from extra_data field
- Removes coprocessor address tracking from SNS ciphertext materials
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| kms-connector/simple-connector/Cargo.toml | Updates dashmap dependency specification |
| kms-connector/crates/utils/src/types/db.rs | Removes coprocessor address field from database types |
| kms-connector/crates/utils/src/tests/rand.rs | Updates test data generation to exclude coprocessor addresses |
| kms-connector/crates/kms-worker/tests/s3.rs | Simplifies S3Service instantiation by removing provider dependency |
| kms-connector/crates/kms-worker/src/core/kms_worker.rs | Updates type signatures to remove provider generic |
| kms-connector/crates/kms-worker/src/core/event_processor/s3.rs | Major refactor replacing contract-based URL lookup with extra_data parsing |
| kms-connector/crates/kms-worker/src/core/event_processor/processor.rs | Removes provider generic from processor types |
| kms-connector/crates/kms-worker/src/core/event_processor/decryption.rs | Implements S3 URL matrix decoding and adds corresponding tests |
| kms-connector/crates/kms-worker/Cargo.toml | Removes dashmap dependency |
| kms-connector/connector-db/migrations/20250902144114_update_sns_ciphertext.sql | Database migration to remove coprocessor address column |
| kms-connector/Cargo.toml | Updates fhevm_gateway_bindings revision and removes dashmap dependency |
Comments suppressed due to low confidence (1)
kms-connector/crates/kms-worker/src/core/event_processor/decryption.rs:1
- This extremely long hex string constant should be split into multiple lines or stored in a separate test data file for better readability and maintainability.
use crate::core::{
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
kms-connector/crates/kms-worker/src/core/event_processor/decryption.rs
Outdated
Show resolved
Hide resolved
b38f7da to
c67662a
Compare
4cd7fa9 to
9897f9c
Compare
172ca75 to
780febc
Compare
kms-connector/crates/kms-worker/src/core/event_processor/decryption.rs
Outdated
Show resolved
Hide resolved
melanciani
left a comment
There was a problem hiding this comment.
small change: storage urls are no longer in extraData and can be found as a new field in the request event
780febc to
d04ee84
Compare
|
Should be good now @RomanBredehoft (cc @dartdart26) |
Add support for a separate uin256 context ID in the event listened to by the gw-listener and using it to sign a `CiphertextVerification` in transaction-sender. Related to #211
chore(kms-connector): update mock contract address chore(kms-connector): remove gw conn from kms-worker chore(kms-connector): update extra_data encoding fix(kms-connector): fix kms-worker health tests chore(kms-connector): adapt storage urls retrieval chore(kms-connector): s3 urls edge case handling
aaea886 to
92f278a
Compare
29b4ec8 to
0bb20fb
Compare
0bb20fb to
390c08a
Compare
|
Closing, no longer wanted |
Ref https://github.com/zama-ai/fhevm-internal/issues/404